package com.chinaoly.baotou.common;

import lombok.Data;
import org.apache.poi.ss.formula.functions.T;

/**
 * 统一API响应结果封装
 */
@Data
public class Result {
    private int code;
    private String message;
    private String serverTime;
    private T data;

    public Result setCode(ResultCode resultCode) {
        this.code = resultCode.code;
        return this;
    }

    public Result setCode(int code) {
        this.code = code;
        return this;
    }

    public Result setMessage(String message) {
        this.message = message;
        return this;
    }

    public Result setServerTime(String serverTime) {
        this.serverTime = serverTime;
        return this;
    }

    public T getData() {
        return data;
    }

    public Result setData(T data) {
        this.data = data;
        return this;
    }

    @Override
    public String toString() {
        return null;
    }

}
